package com.agimatec.locators.predicate.xpath;

import com.agimatec.locators.predicate.LocatorStringProducer;

/**
 * Created by IntelliJ IDEA.
 * User: sschuth
 * Date: 25.03.2010
 * Time: 11:32:19
 * To change this template use File | Settings | File Templates.
 */
class XPathCssClass implements LocatorStringProducer {
    private String clazz;

    public XPathCssClass(String clazz) {
        this.clazz = clazz;
    }

    public String locatorString() {
        // FIXME this works, but is not sufficient, since looking 
        // for "enabled" would match class="not-enabled", too!
        return "[contains(@class,'" + this.clazz + "')]";

    }
}
